home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 1 Issue 2
/
PDCD-1 - Issue 02.iso
/
_utilities
/
utilities
/
001
/
quotes
/
!SQ%a0Source
/
Other
/
MoreInfo
< prev
next >
Wrap
Text File
|
1994-11-09
|
19KB
|
371 lines
Other.MoreInfo - more stuff about Smart Quotes.
See !Help ₧le for copyright stuff etc.
What these ₧les actually do
***************************
NB: This assumes MoreInfo is in the !Quotes directory, *not* the
!SQáSource directory. All this stuff about SlimDown only makes sense if you
have one big humungous application, not two separate biggish ones.
Choices holds the location of the choices directory (by default
öSQáChoicesò in <SmartQuotes$Dir>). This directory holds Chars, Diphthongs,
Setup and Choices, which hold the various Smart Quotes choices, preferences
etc.
SlimDown will create an application called !SQáSource in the directory
!Quotes is in, and put all the source code stuff in it. *YOU SHOULD THEN MAKE
A BACKUP OF THIS DIRECTORY!*. It will also replace the massive !Help ₧le by a
rather smaller one, although the !Help ₧le will still be there ù it will
have been renamed to ReadMe. Running !SQáSource will copy the stuff back,
provided Smart Quotes has been seen.
As the whole process is quite complicated, you should actually make a
backup of the whole Smart Quotes application before you start mucking about
with this sort of stuff.
The Vector routine is used to read the diphthongs, and is read in from
disc rather than being assembled every time (wasteful of memory).
The MoreHelp module supplies interactive help for Smart Quotes; the
!IntHelp ₧le contains the messages for it to use in the appropriate format.
CopyFat, CopySlim, FattenUp, Slim!Sprit, Small!Help and SourceHelp are all
used during the slimming down (putting loads of stuff in !SQáSource) or
fattening up processes (putting it back into !Quotes). You donæt need to know
about it ù if you do, hack the ₧le.
Other.AppSource is the source code for the application - i.e. itæs
readable. ;)
Other.ModSource is the source code for the module - it wasnæt included in
the ₧rst release, but seeing as I (very partially) ripped off Michael
Rozdobaæs source code because he included it with Desktop+, I felt it would
be unfair not to include mine. Also, I spent too much time trying to work out
why my code wasnæt working (eventually, I had a look at other ₧lters using
Zap and realised I didnæt have to use Wimp_ProcessKey after all...) not to
appreciate people supplying readable, commented code. So here it is.
Other.ShortHelp is a set of library routines for compacting help strings
using OS_PrettyPrintæs internal dictionary. If you hardwire the codes into
the source code it looks ugly, confusing, and it's almost impossible to read
(look at Desktop+æs source code ;) ). See Other.ShortHDocs for more
information.
Other.VecSource is the source code for a small routine that traps the
WrchV vector, spools all output into a buffer, and then gives the vector
back. Itæs used to get the list of diphthongs from the module without having
to use a message or a SWI (both of which need an of₧cial number from Acorn
and quite a bit of work). The routine uses *ShowDiphthongs TINY (an
undocumented - well almost - version of ShowDiphthongs), to produce a list
without any formatting (try it yourself).
The ₧les you actually need
***************************
OK, if this is supposed to be a nice compact utility, how come it takes up
nearly 250K of disc space? The answer is that, out of those 250K, about 125K
is source code and various documentation ù which you donæt need to use Smart
Quotes. If you are running Smart Quotes from a network or a ƒoppy, you can
make considerable savings by removing the unused ₧les.
If your copy of Smart Quotes only takes 125K or so, then you already have
a slim version, in which case you should ignore the rest of the section.
There is a ₧le in the Smart Quotes directory called SlimDown, which will
move all the unnecessary stuff out of the Smart Quotes directory into a
separate !SQáSource application. As it renames the ₧les rather than copying
them, it shouldnæt need too much free disc space (maybe a few K, but no
more). You will now have a slimmed-down (125K or so) version of !Quotes that
will run perfectly happily. *BUT DONæT LOSE !SQáSOURCE !*
Running !SQ Source will copy all the stuff back.
** NB ** : I make no guarantee that this will actually work on your
machine. It should, but you never know what sorts of strange things could
happen. When in doubt, copy the stuff manually.
You may have been supplied with a ösmallò version of Smart Quotes, in
which case you should be able to get a copy of !SQáSource. Running it should
copy the ₧les back.
See the FileList files for full lists of the files you should have.
Other miscellanea
*****************
You canæt have two copies of Smart Quotes loaded at once, as that would
just be too confusing ù besides, when you quit one, the other one would very
soon complain about not having a module to work with. So if you load a second
copy, the older one quits.
Some of you out there might be annoyed that Smart Quotes doesnæt bother to
check the size of the current mode when it opens its windows ù so they may
very well be off-centre. But all is not lost: Smart Quotes will save the
position of the windows when you save the choices, and re-use them at the
next session.
* commands
**********
ShowDiphthongs : produces a list of diphthongs.
AddDipthong <₧rst> <second> <subst> : add a diphthong to the list.
RemoveDiphthong <pos> : remove diphthong number <pos> from the list.
ClearDiphthongs : wipe the list of diphthongs.
There is also help available on the Smart Quotes variables (see below), and
on diphthongs.
Variables
*********
There are several special variables used by Smart Quotes ù öspecialò
because they canæt be deleted by the user and directly reƒect the workings
of the program. SmartQuotes$Options and SmartQuotes$Subst both take the form
of a binary number (i.e. a number of the form 2_101, where the ö2_ò means
öthis number is a binary numberò). Viewing the variable shows the current
state of some of the programæs settings, changing the value of the variable
will change them.
SmartQuotes$Options controls Smart Quotesæ settings, exactly like the
Settings dialogue boxes do. It takes the form 2_edcba, where a stands for bit
0, b for bit 1, c for bit 2, d for bit 3, e for bit 4. The bits have the
following meaning:
Bit 0 Double quotes substitution : 1: smart quotes
0: neutral quotes
Bit 1 Single quotes substitution : 1: smart quotes
0: neutral quotes
Bit 2 Form of substituted single quotes 1: All closed
0: Open and closed
Bit 3 Diphthong substitution : 1: substitute
0: donæt substitute
Bit 4 Typing mistake checking : 1: check and replace
0: leave as they are
Typing *Set SmartQuotes$Options 2_10011 at the CLI would turn double quote
and single quote substitution on, substitute both open and closed single
quotes, turn off diphthong substitution but turn on typing mistake checking.
Typing *Set SmartQuotes$Options 19 would have the same effect.
SmartQuotes$Subst controls the future form of double quotes and single
quotes (like Smart Quotesæ icon when öShow next quote in iconò is selected).
It takes the form 2_ba, where a stands for bit 0, b for bit 1. The bits have
the following meaning:
Bit 0 Next double quote will be... 1: closed
0: open
Bit 1 Next single quote will be... 1: closed
0: open
Typing *Set SmartQuotes$Subst 2_10 would make the next double quote open
and the next single quote closed (if that doesnæt conƒict with current
settings). Note that the settings are meaningless if quotes arenæt
substituted by smart quotes.
The other four variables are more straightforward, and allow you to view
and modify the characters SmartQuotes substitutes quotes by. Their full names
are:
SmartQuotes$OpenDouble
SmartQuotes$ClosedDouble
SmartQuotes$OpenSingle
SmartQuotes$ClosedSingle
So typing *Set SmartQuotes$ClosedDouble ╗ would make Smart Quotes replace
what it thinks should be a closed quote by ╗. Giving Smart Quotes silly
values (i.e. nonprintable) or no value at all will reset the value to its
default value.
Smart Quotes also uses other, perfectly normal, variables, usually de₧ned
in the !Run ₧le.
Å SmartQuotes$Dir points to the main Smart Quotes directory, with
!RunImage, Templates etc.
Å SmartQuotes$ChoicesDir points to the Choices directory, where Chars,
Choices and Diphthongs will be saved. This is usually öSQáChoicesò in
SmartQuotes$Dir, except when Smart Quotes is started from a read-only
₧ling system (network, read-only ArcFS, etc.), in which case you should
change this to point elsewhere.
Å SmartQuotes$RunChars points to a ₧le, usually Resources:$.Apps.!Chars,
which will be run when you Shift-Adjust-click on the Settings windowæs
close icon.
Å SmartQuotes$MainFont contains the name of the default font for the
diphthongs window.
Å SmartQuotes$HeadFont contains the name of the font used for headings in
the diphthongs window.
Å SmartQuotes$FontSize contains the size of the font, in sixteenths of a
point.
All of these except SmartQuotes$Dir can be changed with the Other choices
window, and are stored in the <SmartQuotes$ChoicesDir>.Setup file
(ChoicesDir is stored in <SmartQuotes$Dir>.Choices).
Version history
***************
So far, there have been four releases of Smart Quotes:
1.00 - very basic, just the textual settings box and an icon
1.13 - much more developed, everything except Diphthongs and tweaks
1.14 - as 1.13 but with hi-res icons
1.20 - the latest version, with diphthongs and various tweaks
1.20b - as 1.20, with a few bugs corrected
If version numbers had anything to do with the number of changes, then
version 1.20 would now be version 1.23 ù it's been version 1.20 for a month
now ;). But I like 1.20 ù Beeb owners will know why ;).
A list of the changes between versions follows.
Version 1.20 - 1.20b
See ReadMe120b file.
Version 1.14 - 1.20
Å Diphthong support added (module is now almost twice as big), view,
edit, add, delete and save from the front end, using outline fonts.
Å Lots of new mouse shortcuts added (iconbar Adjust-click, Shift, Ctrl
and Alt-clicks, Adjust-click on settings box, clicks on close icon).
Å Other choices window added (actually a separate program) to change
font, choices directory and character viewer.
Å Typing mistake correction added.
Å Insert window removed (not particularly useful with all those
diphthongs). Adjust-clicking on any windowæs close icon runs !Chars
(by default - see öOther choicesò in main ReadMe for more details).
Å Interactive Help support added with the More Help module.
Å Refresh button in Chars window re-reads the characters. Characters
window now uses outline fonts.
Å Sprites are now available in high- and low-res versions. The
high-res versions are in a four-colour mode (with palette), to reduce
memory requirements (i.e. wouldnæt ₧t otherwise).
Å When you change the settings, only changes the önext quoteò bit if
the type of quote has changed - if the next double quote is closed,
and you change single quote substitution, the next double quote stays
closed.
Å Adjust-click swaps between quote substitution and no substitution
(useful when you need to temporarily disable substitution). You can
choose whether Smart Quotes remembers the quotesæ state (i.e.
currently open or closed) when you swap ù see the !Help ₧le for why
this is useful.
Å SQ Unused changed to SQ Source: from this version, you donæt have to
distribute the source code with the program, so the name was changed
to highlight the fact. The !Help ₧le, consequently, is not copied
over, as otherwise you wouldnæt know what all this was about. Various
things have been copied between the ₧les so it makes sense.
Å All those DoubleOn, BothSingle etc. commands have been removed ù
thereæs no use for them with the variable and it only clutters up the
module.
Å Various stuff: module uses OS_PrettyPrint to encode the messages;
Settings box shows the state (as icons or as text) in the title bar;
error messages tidied up (not as worrying when a ₧le isnæt there);
memory used by template routine reduced (twice); desktop save works
correctly; changing characters takes effect immediately; 2D
templates removed; asterisks changed to bullets in the help ₧les;
warning when you load a new version removed (memory, memory...);
öChars...ò changed to öCharacters...ò
Version 1.13 - 1.14
Å High-res sprites, slightly modi₧ed template ₧le by Kemal Sangrar.
First version to be tested on a RISC PC.
Version 1.00 - 1.13
Å Two code variables added: the front-end stays in sync with the
module all the time, and you can set the settings from an Obey ₧le
or a Desktop ₧le (e.g. in your !Boot).
Å Icon can now reƒect the future state of the substituted quotes
(i.e. open, closed or neutral).
Å Graphical settings dialogue box added - easier to use and smaller.
Å Can change the characters used in substitutions from the front-end
and via code-variables (e.g. in your !Boot).
Å Choices dialogue box added to switch between the two settings boxes
and other things. You can save all choices, or revert to default.
Å Added !Chars-like window, so you can insert quotes as a one-off
(saves the hassle of changing mode) or into writable icons.
Å Now uses the Desktop Save protocol.
Å Possibility of not killing module when the front-end quits.
Å Canæt have two copies of the front-end at once.
Å Clicking SELECT on the icon bar icon brings up the settings box,
clicking ADJUST brings up the insert window. Clicking again closes
them again.
Å Added a variable (SmartQuotes$ChoicesDir) that points to the Choices
directory, so you can set this to point elsewhere if you are running
SmartQuotes from a read-only ₧ling system (i.e. NetFS or ArcFS).
Å Smart Quotes saves the position of the four windows in the Choices.
Å Added a bunch of very complicated Obey ₧les to slim down the Quotes
directory (100K is too much for a 32K application ;) ).
Å Adjust-clicking on the Menu works - the Menu stays around.
Å Decent error handling
Thanks, acknowledgements, comments
**********************************
I would like to thank Acorn for this nice machine, and especially the bit
in RISC OS 3.1 (the Filter Manager) that allows you to intercept other tasksæ
events and muck about with them as you please. It is exceedingly useful - I
have currently seven programs that intercept ₧lters on my machine (it used to
be four, but I've been adding them since)...
I got the idea for this utility after reading a small news item in
MacWorld about a similar program for the Mac, that sat in the background and
substituted quotes for you. It also did em dashes, and Smart Quotes didnæt
use to do those, but now it does, and much more...
I am grateful to Michael Rozdoba, author of Desktop+, for making his
source code freely-available so I could see how he coded his code variables -
although I must point out that the vast majority of the code is mine (I
pinched that sentence from him as well ;) ). I donæt think anyone out there
consciously rips off other peopleæs code (as in copies large chunks of it
verbatim and calls it his own); however, Iæm sure every programmer out there
has at one stage or another taken a peek at someone elseæs code. And as Iæm
not doing this for money or anything, Iæve included the complete source code
to the application, module and even vector claim routine ;).
Also, thanks to the people who e-mailed me to tell me how wonderful
previous versions were (or not, as the case may be), and to give me ideas
for this version. In particular, I can thank the following
Kemal Sangrar (gtmw03@arts.gla.ac.uk) - sprites and template
Peter Killworth (atmpk@vax.oxford.ac.uk) - bug reports
Simon Jackson (S.D.R.Jackson@hertfordshire.ac.uk) - wish list
Andrew at HENSA (pdarch@cent1.lancs.ac.uk)
Simon Middleton at Uniqueway (simon@uniqway.demo.co.uk) - CD ;)
Other people have mailed me since I last wrote this, and I donæt have their
names here - sorry!
The disclaimer was öliftedò from Ting Kueiæs DeskPatch help ₧le - this
doesnæt mean anything, I was just looking for a disclaimer and DeskPatch was
the ₧rst thing I looked at that had one I liked. The freeware bit I also
stole from someone, but I canæt remember who - sorry!
Other people I should thank for writing very useful bits of software, used
to write this or just making my desktop look prettier:
Dick Alstein, for his wonderful TemplEd.
Dominic Symes for Zap (love the colour-coding, shame about the fonts).
Cy Booker for his BASIC cruncher - worth every penny of the registration fee.
Michael Rozdoba, obviously, for Desktop+ - so good it was on two
magazine discs...
Mark Greenwood, for Black Hole.
Ian Jeffray for Memory Pie (even if I hate the gratuitous pic ;) ).
Brian Scattergood for his Infocom interpreter.
Clive Jones for QuickDirs (very nice ₧lter ;) ).
Simon Burrows for FontsPlus (font directory thingy).
Rheingold for Vigil (intercepts taskæs messages - very useful)
Computer Concepts for Impression Publisher.
Sorry for anyone Iæve forgotten.
Wish-list
*********
Things that might be nice would be:
Å Proper apostrophe substitution. This will almost definately be in the
next version of Smart Quotes (see ReadMe120b for more details).
Å Disable substitution when youære in Zap (or another text editor that
doesnæt like top-bit-set characters). That would mean, presumably,
having a list of task handles or names that Smart Quotes doesnæt like
ù lots of work, if you ask me. Maybe next version...
Å Provide diphthongs of more than two characters. Apart from the fact
that diphthongs *are* only two characters (pedant mode off), it would
be too complicated and not really worth it.
Å Add quotes etc. to a ₧le dragged to the icon, or remove them. Slight
snag: apart from not being obviously in line with what Smart Quotes
already does, it would be enormously memory-hungry. Might put it in
another program ù when Iæve ₧nished all the other ₧lters I want to do
;).
Note that since last version (1.13 or 1.14), more than half of the
previous wishlist has been implemented. :) Changing the settings with hotkeys
has been removed: you will probably be using this program in Impression, and
Impression uses most of the possible shortcuts already.